﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using yncTech.BusinessObjects;
using yncTech.Common;

public partial class Admin_FinSav_FinSav004a : AdminBasePage
{
    decimal receiptID = -1;
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.QueryString[FinReceiptMetadata.ColumnNames.ReceiptID] != null)
        {
            receiptID = decimal.Parse(Request.QueryString[FinReceiptMetadata.ColumnNames.ReceiptID]);
        }
        if (!IsPostBack)
        {
            switch (ActionType)
            {
                case OperationType.Update:
                    FinReceipt finR = new FinReceipt();
                    finR.LoadByPrimaryKey(receiptID);
                    finR.IsConfirmed = true;

                    finR.UpdatedDttm = DateTime.Now;
                    finR.UpdatedBy = LoginUserInfo.CurrentUser.LoginName;
                    finR.Save();

                    WebHelper.GotoParent();

                    break;
            }
        }
    }
}